<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Gif倒放工具</title>
</head>
<body>
<form name="form" enctype="multipart/form-data" method="post" action="./create.php">
    <input id="file" name="file" type="file" accept="image/gif" onchange="onFileSelect()">
    <button type="submit" value="submit">
        转换
    </button><br>
    <img src="" name="src" id="src"/><br>
    <img src="" name="des" id="des"/><br>
</form>
</body>
<script>
    function onFileSelect() {
        var oFReader = new FileReader();
        var file = document.getElementById('file').files[0];
        oFReader.readAsDataURL(file);
        oFReader.onloadend = function(oFRevent){
            var src = oFRevent.target.result;
            var imgsrc=document.getElementById("src");
            imgsrc.src=src;
        }
    }
</script>
</html>